Skip to content

Import items that don't already exist when compileOnImport is not set #799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2025

Conversation

raymond-rebbeck
Copy link
Contributor

Fixes #798

Import All will now import items when compileOnImport = 0.

Previously items that had also been added to source control would not also be imported as the pull event handler would not be invoked, which would otherwise have imported then.

Prior to 03607e9 items would have been imported as part of adding them to source control, which no longer happens.

@raymond-rebbeck raymond-rebbeck force-pushed the import-all-no-compile branch 2 times, most recently from 413fee4 to 3ae9784 Compare July 2, 2025 23:17
Copy link
Collaborator

@isc-pbarton isc-pbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One fix requested, otherwise looks good.

if ..IsInSourceControl(internalName) {
set sc = ..ImportItem(internalName, force)
} else {
if '..IsInSourceControl(internalName) {
set sc = ..AddToServerSideSourceControl(internalName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can run into an error here because sc is not defined if the very first file is not in source control:

<UNDEFINED>ImportRoutines+20^SourceControl.Git.Utils.1 *sc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have updated the branch to address this.

… compileOnImport is not set

For an item that is not already in source control, Import All would add it to source control and then if compileOnImport was set the default pull handler would be invoked, which would result in the item being imported too. However, when compileOnImport is not set the default pull handler would not be invoked, and the item would not be imported.

This change makes it so that the item is imported when compileOnImport is not set.
@isc-pbarton isc-pbarton merged commit af1b42d into intersystems:main Jul 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import All will not import anything that doesn't already exist if compileOnImport is not set
2 participants